import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import index from '@/components/index'
import my from '@/components/my'
import indroduce from '@/components/indroduce'
import tab3 from '@/components/tab3'
import maps from '@/components/map'
import login from '@/components/login'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/login',
      meta: { navShow: false},
      name: 'login',
      component: login
    },
    {
      path: '/HelloWorld',
      meta: { navShow: true, cname: '一级页面' },
      name: 'Hello',
      component: HelloWorld
    },
    {
      path: '/index',
      component: index,
       meta: { navShow: true},
       name: 'index',
    },
    {
    	path:'/tab3',
    	name: 'tab3',
      component: tab3,
      meta: { navShow: true},
    },
    {
      path:'/indroduce',
      name: 'indroduce',
      component: indroduce,
      meta: { navShow: false, cname: '子页面' },
    },
    {
      path: '/my',
      name: 'my',
      component: my,
      meta: { navShow: true},
    },
    {
      path: '/map',
      name: 'maps',
      component: maps,
      meta: { navShow: false, cname: '子页面' },
    },
    {   // 地址为空时跳到index
      path: '', redirect: '/index'
    },
    {
      //重定向不在路由列表的
      path: '*',
      redirect: 'Home',
    },
  ]
})
